package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.entity.SalaryBillDO;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

import static org.jsola.hr.example.SalaryBillExample.N_MONTH;
import static org.jsola.hr.example.SalaryBillExample.E_MONTH;
import static org.jsola.hr.example.SalaryBillExample.M_MONTH_MAX;
import static org.jsola.hr.example.SalaryBillExample.N_YEAR;
import static org.jsola.hr.example.SalaryBillExample.E_YEAR;
import static org.jsola.hr.example.SalaryBillExample.M_YEAR_MAX;
import static org.jsola.hr.example.SalaryBillSendExample.*;
import static org.jsola.hr.example.SalaryBillSendExample.E_AUTO_CHECK_HOURS;
import static org.jsola.hr.example.SalaryBillSendExample.E_AUTO_CHECK_UNIT;
import static org.jsola.hr.example.SalaryBillSendExample.E_CHECK_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.E_COMPANY_ID;
import static org.jsola.hr.example.SalaryBillSendExample.E_FEEDBACK_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.E_READ_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.E_SEND_BY;
import static org.jsola.hr.example.SalaryBillSendExample.E_SEND_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.E_SEND_NAME;
import static org.jsola.hr.example.SalaryBillSendExample.E_SEND_TIME;
import static org.jsola.hr.example.SalaryBillSendExample.E_SEND_TYPE;
import static org.jsola.hr.example.SalaryBillSendExample.E_SHOW_EMPTY_VALUE;
import static org.jsola.hr.example.SalaryBillSendExample.E_TABLE_ID;
import static org.jsola.hr.example.SalaryBillSendExample.E_WITHDRAWN_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.E_WITHDRAW_STATUS;
import static org.jsola.hr.example.SalaryBillSendExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.SalaryBillSendExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.SalaryBillSendExample.M_SEND_BY_MAX;
import static org.jsola.hr.example.SalaryBillSendExample.M_SEND_NAME_MAX;
import static org.jsola.hr.example.SalaryBillSendExample.M_TABLE_ID_MAX;
import static org.jsola.hr.example.SalaryBillSendExample.N_AUTO_CHECK_HOURS;
import static org.jsola.hr.example.SalaryBillSendExample.N_AUTO_CHECK_UNIT;
import static org.jsola.hr.example.SalaryBillSendExample.N_CHECK_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.N_COMPANY_ID;
import static org.jsola.hr.example.SalaryBillSendExample.N_FEEDBACK_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.N_READ_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.N_SEND_BY;
import static org.jsola.hr.example.SalaryBillSendExample.N_SEND_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.N_SEND_NAME;
import static org.jsola.hr.example.SalaryBillSendExample.N_SEND_TIME;
import static org.jsola.hr.example.SalaryBillSendExample.N_SEND_TYPE;
import static org.jsola.hr.example.SalaryBillSendExample.N_SHOW_EMPTY_VALUE;
import static org.jsola.hr.example.SalaryBillSendExample.N_TABLE_ID;
import static org.jsola.hr.example.SalaryBillSendExample.N_WITHDRAWN_COUNT;
import static org.jsola.hr.example.SalaryBillSendExample.N_WITHDRAW_STATUS;

/**
 * 工资条发放信息
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【工资条发放信息】的参数")
@Data
public class SalaryBillSendAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_TABLE_ID, example = E_TABLE_ID)
    @Length(max = 32, message = M_TABLE_ID_MAX)
    private String tableId;

    @ApiModelProperty(notes = N_SEND_TYPE, example = E_SEND_TYPE)
    private Integer sendType;

    @ApiModelProperty(notes = N_AUTO_CHECK_HOURS, example = E_AUTO_CHECK_HOURS)
    private Integer autoCheckHours;

    @ApiModelProperty(notes = N_AUTO_CHECK_UNIT, example = E_AUTO_CHECK_UNIT)
    private Integer autoCheckUnit;

    @ApiModelProperty(notes = N_SHOW_EMPTY_VALUE, example = E_SHOW_EMPTY_VALUE)
    private Boolean showEmptyValue;

    @ApiModelProperty(notes = N_SEND_NAME, example = E_SEND_NAME)
    @Length(max = 255, message = M_SEND_NAME_MAX)
    private String sendName;

    @ApiModelProperty(notes = N_SEND_BY, example = E_SEND_BY)
    @Length(max = 255, message = M_SEND_BY_MAX)
    private String sendBy;

    @ApiModelProperty(notes = N_SEND_TIME, example = E_SEND_TIME)
    private Date sendTime;

    @ApiModelProperty(notes = N_SEND_COUNT, example = E_SEND_COUNT)
    private Integer sendCount;

    @ApiModelProperty(notes = N_READ_COUNT, example = E_READ_COUNT)
    private Integer readCount;

    @ApiModelProperty(notes = N_CHECK_COUNT, example = E_CHECK_COUNT)
    private Integer checkCount;

    @ApiModelProperty(notes = N_FEEDBACK_COUNT, example = E_FEEDBACK_COUNT)
    private Integer feedbackCount;

    @ApiModelProperty(notes = N_WITHDRAWN_COUNT, example = E_WITHDRAWN_COUNT)
    private Integer withdrawnCount;

    @ApiModelProperty(notes = N_WITHDRAW_STATUS, example = E_WITHDRAW_STATUS)
    private Boolean withdrawStatus;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_SALARY_BILL_DO_LIST, example = E_SALARY_BILL_DO_LIST)
    private List<SalaryBillDO> salaryBillDOList;

    @ApiModelProperty(notes = N_YEAR, example = E_YEAR)
    @NotNull
    @Length(max = 32, message = M_YEAR_MAX)
    private String year;

    @ApiModelProperty(notes = N_MONTH, example = E_MONTH)
    @NotNull
    @Length(max = 32, message = M_MONTH_MAX)
    private String month;

    /**
     * 业务id
     */
    private String subjectId;


}

